import request from './utils/request'

// 获取列表
export function queryMemberInfo(id) {
  return request({
    url: '/appApi/queryMemberInfo',
    method: 'get',
    params: { openId:id }
  })
}

// 获取详情
export function updateMemberInfo(data) {
    return request({
      url: '/appApi/updateMemberInfo',
      method: 'post',
      data: data
    })
}

//中奖记录
export function getAwardsInfoByTaskIdAndOpenId(taskId,openId) {
    return request({
      url: '/appApi/getAwardsInfoByTaskIdAndOpenId',
      method: 'get',
      params: { taskId:taskId,openId:openId }
    })
}

//答题记录
export function getSubmitListByTask(taskId,userId) {
  return request({
    url: '/appApi/getSubmitListByTask',
    method: 'get',
    params: { taskId:taskId,userId:userId }
  })
}


//上传新图片
export function myInfoAvatarUpdate(data) {
  return request({
    url: '/appApi/myInfoAvatarUpdate',
    headers:{"content-type": "multipart/form-data"},
    method: 'post',
    data: data
  })
}

//分享
export function share(taskId,userId) {
  return request({
    url: '/appApi/share',
    method: 'get',
    params: { taskId:taskId,userId:userId }
  })
}